package com.myexam.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.myexam.service.TeacherService;
import com.opensymphony.xwork2.ActionSupport;

@Controller
@Scope("prototype")
public class ExamDeleteAction extends ActionSupport {

	
	private static final long serialVersionUID = -5422202163099255633L;
	@Autowired
	private TeacherService teacherService;
	private int exam_id;
	public int getExam_id() {
		return exam_id;
	}
	public void setExam_id(int exam_id) {
		this.exam_id = exam_id;
	}
	public String execute()throws Exception{
		System.out.println(exam_id);
		teacherService.deleteExam(exam_id);
		return SUCCESS;
	}
}
